package ua.kpi.javatraining.university;

/**
 * @author Vasily Yatsenko
 */
public final class Name {
    private final String firstName;
    private final String secondName;

    public Name(String firstName, String secondName) {
        this.firstName = firstName;
        this.secondName = secondName;
    }

    public String getFirstName() {
        return firstName;
    }

    public String getSecondName() {
        return secondName;
    }

    public String toString() {
        StringBuilder builder = new StringBuilder();

        builder.append(firstName);
        builder.append(" ");
        builder.append(secondName);
        return builder.toString();
    }
}
